﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web;

namespace Daco.Web.Store
{
    public struct CManufacture
    {
        public int ManufactureID { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }

        public string EncodedTitle
        {
            get { return HttpContext.Current.Server.UrlEncode(Utils.CHelper.LatinToAscii(this.Name)); }
        }

        public CManufacture(int manufactureID, string name)
            : this()
        {
            ManufactureID = manufactureID;
            Name = name;
            Description = null;
        }

        public override bool Equals(object obj)
        {
            return this.ManufactureID == ((CManufacture)obj).ManufactureID;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override string ToString()
        {
            return ManufactureID.ToString();
        }
    }
}
